<?php


    // Author: Tomasz Durka
    // Date: 5th February 2007
    // Prints out a link for PHP nails
    
    
  function cycle ($cycle_options) {
    static $cycle_options_counters;
    $cycle_options_counters[serialize($cycle_options)] = $cycle_options_counters[serialize($cycle_options)] + 1;
    $counter = $cycle_options_counters[serialize($cycle_options)];
    $cycle_options = array_values($cycle_options);
    return $cycle_options[($counter-1) % count($cycle_options)];
    
  }

?>